package com.ztc.ZtcRouteSite.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ztc.ZtcRouteSite.bean.ZtcRouteSite;
import com.ztc.ZtcRouteSite.dao.ZtcRouteSiteDao;
@Service("ZtcRouteSite")
public class ZtcRouteSiteManager{
    @Autowired
    ZtcRouteSiteDao ztcRouteSiteDao;
    public String save(ZtcRouteSite ztcRouteSite){
    	return ztcRouteSiteDao.save(ztcRouteSite);
    }

    public List<ZtcRouteSite> getAll(){
        return ztcRouteSiteDao.getAllZtcRouteSites();
    }


    public List<ZtcRouteSite> searchInfoEquals(ZtcRouteSite ztcRouteSite) {
		return ztcRouteSiteDao.searchInfoEquals(ztcRouteSite);
	}

    /**
     * 根据名称和城市模糊查找线路站点
     * @param name 名称
     * @param areaCity 城市
     * @return 线路站点集合
     */
    public List<ZtcRouteSite> searchInfoLikes(String name,String areaCity){
        List<ZtcRouteSite> list= ztcRouteSiteDao.searchInfoLikes(name, areaCity);
        return list;
    }

    /**
     * 根据站点id或线路id删除线路站点
     * @param id 站点 id
     * @param ztcRouteId 线路id
     * @return 操作结果信息：0.失败1.成功
     */
    public String delete(String id, String ztcRouteId){
        return ztcRouteSiteDao.delete(id, ztcRouteId);
    }
  
}
